var o, e = require, t = module, n = exports, i = this && this.__extends || (o = function(t, e) {
    return (o = Object.setPrototypeOf || {
        __proto__: []
    } instanceof Array && function(t, e) {
        t.__proto__ = e;
    } || function(t, e) {
        for (var o in e) e.hasOwnProperty(o) && (t[o] = e[o]);
    })(t, e);
}, function(t, e) {
    function i() {
        this.constructor = t;
    }
    o(t, e), t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype, 
    new i());
}), a = this && this.__decorate || function(t, e, o, i) {
    var n, l = arguments.length, a = l < 3 ? e : null === i ? i = Object.getOwnPropertyDescriptor(e, o) : i;
    if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(t, e, o, i); else for (var p = t.length - 1; 0 <= p; p--) (n = t[p]) && (a = (l < 3 ? n(a) : 3 < l ? n(e, o, a) : n(e, o)) || a);
    return 3 < l && a && Object.defineProperty(e, o, a), a;
};

Object.defineProperty(n, "__esModule", {
    value: !0
});

var r = e("GameData"), s = e("AudioManager"), c = e("UIManager"), l = e("GideModel"), d = e("Global"), u = e("GideView"), p = e("LevelView"), h = e("BoxView"), f = e("ItemView"), g = e("PersonView"), m = e("TestGideManager"), y = cc._decorator, v = y.ccclass, w = y.property, b = function(e) {
    function t() {
        var t = null !== e && e.apply(this, arguments) || this;
        return t.tempBox = null, t.tempItem = null, t.layout = null, t.levelView = null, 
        t.personView = null, t.petView = null, t.gideView = null, t.boxs = [], t.curItem = null, 
        t.matrix = [ 0, 0, 1, 2 ], t;
    }
    return i(t, e), t.prototype.onLoad = function() {
        var t = cc.winSize;
        t.width > t.height ? this.node.scale = 1 : this.node.scale = 2;
    }, t.prototype.onClick = function() {
        window.playableSDK.openAppStore(), console.log("open app store");
    }, t.prototype.onEnable = function() {
        this.layout.on(cc.Node.EventType.TOUCH_START, this.touchStart, this), this.layout.on(cc.Node.EventType.TOUCH_MOVE, this.touchMove, this), 
        this.layout.on(cc.Node.EventType.TOUCH_END, this.touchEnd, this), this.layout.on(cc.Node.EventType.TOUCH_CANCEL, this.touchEnd, this);
    }, t.prototype.onDisable = function() {
        this.layout.off(cc.Node.EventType.TOUCH_START, this.touchStart, this), this.layout.off(cc.Node.EventType.TOUCH_MOVE, this.touchMove, this), 
        this.layout.off(cc.Node.EventType.TOUCH_END, this.touchEnd, this), this.layout.off(cc.Node.EventType.TOUCH_CANCEL, this.touchEnd, this);
    }, t.prototype.start = function() {
        s.default.getInstance().playBg("背景"), d.G.gunModelList = [ {
            id: 0,
            slot: "shouqiang",
            fire: 0,
            type: 0,
            bullet: 0,
            time: 0,
            total: 10,
            num: 1,
            pow: 70,
            ROT: 0,
            MOV: 2e3,
            HP: 0,
            ATK: 50,
            SPE: 50,
            CRI: 10,
            RAN: 600,
            IDLE: .7,
            m: "小手枪"
        }, {
            id: 1,
            slot: "shouqiang",
            fire: 0,
            type: 0,
            bullet: 0,
            time: 0,
            total: 10,
            num: 1,
            pow: 70,
            ROT: 0,
            MOV: 2e3,
            HP: 0,
            ATK: 100,
            SPE: 50,
            CRI: 15,
            RAN: 650,
            IDLE: .7,
            m: "左轮枪"
        }, {
            id: 2,
            slot: "changqiang",
            fire: 1,
            type: 1,
            bullet: 10,
            time: 1.5,
            total: 15,
            num: 1,
            pow: 30,
            ROT: 10,
            MOV: 2e3,
            HP: 0,
            ATK: 40,
            SPE: 20,
            CRI: 5,
            RAN: 650,
            IDLE: .1,
            m: "冲锋枪"
        }, {
            id: 3,
            slot: "changqiang",
            fire: 2,
            type: 2,
            bullet: 0,
            time: 1,
            total: 5,
            num: 1,
            pow: 200,
            ROT: 0,
            MOV: 2e3,
            HP: 0,
            ATK: 400,
            SPE: -50,
            CRI: 20,
            RAN: 400,
            IDLE: 1,
            m: "暴力枪"
        }, {
            id: 4,
            slot: "shouqiang",
            fire: 0,
            type: 6,
            bullet: 10,
            time: 0,
            total: 10,
            num: 1,
            pow: 30,
            ROT: 0,
            MOV: 1500,
            HP: 0,
            ATK: 80,
            SPE: 50,
            CRI: 10,
            RAN: 600,
            IDLE: .3,
            m: "反弹枪"
        }, {
            id: 5,
            slot: "changqiang",
            fire: 3,
            type: 3,
            bullet: 20,
            time: 3,
            total: 1,
            num: 1,
            pow: 200,
            ROT: 0,
            MOV: 4e3,
            HP: 0,
            ATK: 800,
            SPE: 150,
            CRI: 40,
            RAN: 200,
            IDLE: 3,
            m: "狙击枪"
        }, {
            id: 6,
            slot: "changqiang",
            fire: 4,
            type: 1,
            bullet: 10,
            time: 4,
            total: 40,
            num: 1,
            pow: 30,
            ROT: 30,
            MOV: 2500,
            HP: 0,
            ATK: 60,
            SPE: 0,
            CRI: 5,
            RAN: 500,
            IDLE: .1,
            m: "加特林"
        }, {
            id: 7,
            slot: "changqiang",
            fire: 5,
            type: 4,
            bullet: 0,
            time: 1.5,
            total: 5,
            num: 1,
            pow: 200,
            ROT: 0,
            MOV: 1500,
            HP: 0,
            ATK: 500,
            SPE: -30,
            CRI: 0,
            RAN: 600,
            IDLE: 2,
            m: "雷鸣"
        }, {
            id: 8,
            slot: "changqiang",
            fire: 7,
            type: 7,
            bullet: 0,
            time: 2.5,
            total: 1,
            num: 1,
            pow: 500,
            ROT: 0,
            MOV: 500,
            HP: 0,
            ATK: 600,
            SPE: 150,
            CRI: 30,
            RAN: 150,
            IDLE: 2.5,
            m: "火箭枪"
        }, {
            id: 9,
            slot: "changqiang",
            fire: 8,
            type: 8,
            bullet: 30,
            time: 3,
            total: 5,
            num: 1,
            pow: 200,
            ROT: 0,
            MOV: 1500,
            HP: 0,
            ATK: 500,
            SPE: -30,
            CRI: 5,
            RAN: 400,
            IDLE: .9,
            m: "激光枪"
        }, {
            id: 10,
            slot: "changqiang",
            fire: 9,
            type: 9,
            bullet: 40,
            time: 2.5,
            total: 10,
            num: 1,
            pow: 30,
            ROT: 0,
            MOV: 1500,
            HP: 0,
            ATK: 130,
            SPE: 50,
            CRI: 10,
            RAN: 600,
            IDLE: .25,
            m: "冰冻枪"
        }, {
            id: 11,
            slot: "changqiang",
            fire: 6,
            type: 5,
            bullet: 0,
            time: 2,
            total: 10,
            num: 1,
            pow: 5,
            ROT: 0,
            MOV: 1500,
            HP: 0,
            ATK: 150,
            SPE: 50,
            CRI: 5,
            RAN: 450,
            IDLE: .33,
            m: "科技枪"
        }, {
            id: 12,
            slot: "changqiang",
            fire: 1,
            type: 1,
            bullet: 0,
            time: 2,
            total: 30,
            num: 3,
            pow: 60,
            ROT: 50,
            MOV: 2e3,
            HP: 1e3,
            ATK: 60,
            SPE: 20,
            CRI: 5,
            RAN: 650,
            IDLE: .2,
            m: "AK47"
        }, {
            id: 13,
            slot: "changqiang",
            fire: 2,
            type: 2,
            bullet: 0,
            time: 1,
            total: 5,
            num: 1,
            pow: 200,
            ROT: 0,
            MOV: 2e3,
            HP: 1150,
            ATK: 520,
            SPE: -50,
            CRI: 30,
            RAN: 400,
            IDLE: 1,
            m: "暴力枪Z"
        }, {
            id: 14,
            slot: "shouqiang",
            fire: 0,
            type: 6,
            bullet: 0,
            time: 1,
            total: 10,
            num: 1,
            pow: 30,
            ROT: 0,
            MOV: 2e3,
            HP: 1300,
            ATK: 104,
            SPE: 50,
            CRI: 10,
            RAN: 600,
            IDLE: .25,
            m: "反弹枪Z"
        }, {
            id: 15,
            slot: "changqiang",
            fire: 3,
            type: 3,
            bullet: 20,
            time: 3,
            total: 1,
            num: 1,
            pow: 200,
            ROT: 0,
            MOV: 4e3,
            HP: 1450,
            ATK: 1040,
            SPE: 150,
            CRI: 40,
            RAN: 200,
            IDLE: 3,
            m: "狙击枪Z"
        }, {
            id: 16,
            slot: "changqiang",
            fire: 4,
            type: 1,
            bullet: 0,
            time: 4,
            total: 45,
            num: 1,
            pow: 30,
            ROT: 50,
            MOV: 2500,
            HP: 1600,
            ATK: 90,
            SPE: 0,
            CRI: 5,
            RAN: 500,
            IDLE: .05,
            m: "加特林Z"
        }, {
            id: 17,
            slot: "changqiang",
            fire: 5,
            type: 4,
            bullet: 0,
            time: 1.5,
            total: 5,
            num: 1,
            pow: 200,
            ROT: 0,
            MOV: 1500,
            HP: 1750,
            ATK: 650,
            SPE: -30,
            CRI: 0,
            RAN: 600,
            IDLE: 2,
            m: "雷鸣Z"
        }, {
            id: 18,
            slot: "changqiang",
            fire: 7,
            type: 7,
            bullet: 0,
            time: 2.5,
            total: 1,
            num: 1,
            pow: 500,
            ROT: 0,
            MOV: 500,
            HP: 1900,
            ATK: 800,
            SPE: 150,
            CRI: 35,
            RAN: 150,
            IDLE: 2.5,
            m: "火箭枪Z"
        }, {
            id: 19,
            slot: "changqiang",
            fire: 8,
            type: 8,
            bullet: 30,
            time: 3,
            total: 7,
            num: 1,
            pow: 200,
            ROT: 0,
            MOV: 1500,
            HP: 2050,
            ATK: 600,
            SPE: -30,
            CRI: 20,
            RAN: 400,
            IDLE: .9,
            m: "激光枪Z"
        }, {
            id: 20,
            slot: "changqiang",
            fire: 9,
            type: 9,
            bullet: 40,
            time: 2.5,
            total: 15,
            num: 1,
            pow: 30,
            ROT: 0,
            MOV: 1500,
            HP: 2200,
            ATK: 195,
            SPE: 50,
            CRI: 10,
            RAN: 600,
            IDLE: .25,
            m: "冰冻枪Z"
        }, {
            id: 21,
            slot: "changqiang",
            fire: 6,
            type: 5,
            bullet: 0,
            time: 2,
            total: 10,
            num: 1,
            pow: 5,
            ROT: 0,
            MOV: 1500,
            HP: 2350,
            ATK: 150,
            SPE: 50,
            CRI: 5,
            RAN: 450,
            IDLE: .25,
            m: "科技枪Z"
        }, {
            id: 22,
            slot: "changqiang",
            fire: 1,
            type: 1,
            bullet: 13,
            time: 1.5,
            total: 30,
            num: 1,
            pow: 30,
            ROT: 10,
            MOV: 2e3,
            HP: 2500,
            ATK: 100,
            SPE: 20,
            CRI: 8,
            RAN: 650,
            IDLE: .1,
            m: "冲锋枪X"
        }, {
            id: 23,
            slot: "changqiang",
            fire: 2,
            type: 2,
            bullet: 0,
            time: 1,
            total: 5,
            num: 1,
            pow: 200,
            ROT: 0,
            MOV: 2e3,
            HP: 2650,
            ATK: 640,
            SPE: -50,
            CRI: 35,
            RAN: 400,
            IDLE: 1,
            m: "暴力枪X"
        }, {
            id: 24,
            slot: "shouqiang",
            fire: 0,
            type: 6,
            bullet: 13,
            time: 1,
            total: 15,
            num: 1,
            pow: 30,
            ROT: 0,
            MOV: 2e3,
            HP: 2800,
            ATK: 128,
            SPE: 50,
            CRI: 10,
            RAN: 600,
            IDLE: .2,
            m: "反弹枪X"
        }, {
            id: 25,
            slot: "changqiang",
            fire: 3,
            type: 3,
            bullet: 20,
            time: 3,
            total: 1,
            num: 1,
            pow: 200,
            ROT: 0,
            MOV: 4e3,
            HP: 2950,
            ATK: 1280,
            SPE: 150,
            CRI: 40,
            RAN: 200,
            IDLE: 3,
            m: "狙击枪X"
        }, {
            id: 26,
            slot: "changqiang",
            fire: 4,
            type: 1,
            bullet: 13,
            time: 4,
            total: 50,
            num: 1,
            pow: 30,
            ROT: 50,
            MOV: 2500,
            HP: 3100,
            ATK: 140,
            SPE: 0,
            CRI: 5,
            RAN: 500,
            IDLE: .05,
            m: "加特林X"
        }, {
            id: 27,
            slot: "changqiang",
            fire: 5,
            type: 4,
            bullet: 0,
            time: 1.5,
            total: 5,
            num: 1,
            pow: 200,
            ROT: 0,
            MOV: 1500,
            HP: 3250,
            ATK: 800,
            SPE: -30,
            CRI: 0,
            RAN: 600,
            IDLE: 2,
            m: "雷鸣X"
        }, {
            id: 28,
            slot: "changqiang",
            fire: 7,
            type: 7,
            bullet: 0,
            time: 2.5,
            total: 1,
            num: 1,
            pow: 500,
            ROT: 0,
            MOV: 500,
            HP: 3400,
            ATK: 1e3,
            SPE: 150,
            CRI: 30,
            RAN: 150,
            IDLE: 2.5,
            m: "火箭枪X"
        }, {
            id: 29,
            slot: "changqiang",
            fire: 8,
            type: 8,
            bullet: 30,
            time: 3,
            total: 7,
            num: 1,
            pow: 200,
            ROT: 0,
            MOV: 1500,
            HP: 3550,
            ATK: 700,
            SPE: -30,
            CRI: 10,
            RAN: 400,
            IDLE: .9,
            m: "激光枪X"
        }, {
            id: 30,
            slot: "changqiang",
            fire: 9,
            type: 9,
            bullet: 40,
            time: 2.5,
            total: 15,
            num: 1,
            pow: 30,
            ROT: 0,
            MOV: 1500,
            HP: 3700,
            ATK: 260,
            SPE: 50,
            CRI: 10,
            RAN: 600,
            IDLE: .25,
            m: "冰冻枪X"
        }, {
            id: 31,
            slot: "changqiang",
            fire: 6,
            type: 5,
            bullet: 0,
            time: 2,
            total: 10,
            num: 1,
            pow: 5,
            ROT: 0,
            MOV: 1500,
            HP: 3850,
            ATK: 200,
            SPE: 50,
            CRI: 5,
            RAN: 450,
            IDLE: .2,
            m: "科技枪X"
        }, {
            id: 32,
            slot: "changqiang",
            fire: 1,
            type: 1,
            bullet: 3,
            time: 2.5,
            total: 40,
            num: 4,
            pow: 5,
            ROT: 80,
            MOV: 2e3,
            HP: 4e3,
            ATK: 100,
            SPE: 20,
            CRI: 8,
            RAN: 650,
            IDLE: .15,
            m: "冲锋枪Max"
        }, {
            id: 33,
            slot: "changqiang",
            fire: 2,
            type: 2,
            bullet: 0,
            time: 1,
            total: 5,
            num: 1,
            pow: 200,
            ROT: 0,
            MOV: 2e3,
            HP: 4150,
            ATK: 760,
            SPE: -50,
            CRI: 30,
            RAN: 400,
            IDLE: 1,
            m: "暴力枪Max"
        }, {
            id: 34,
            slot: "shouqiang",
            fire: 0,
            type: 6,
            bullet: 3,
            time: 1,
            total: 20,
            num: 1,
            pow: 30,
            ROT: 0,
            MOV: 2e3,
            HP: 4300,
            ATK: 152,
            SPE: 50,
            CRI: 10,
            RAN: 600,
            IDLE: .2,
            m: "反弹枪Max"
        }, {
            id: 35,
            slot: "changqiang",
            fire: 3,
            type: 3,
            bullet: 20,
            time: 3,
            total: 1,
            num: 1,
            pow: 200,
            ROT: 0,
            MOV: 4e3,
            HP: 4450,
            ATK: 1520,
            SPE: 150,
            CRI: 40,
            RAN: 200,
            IDLE: 3,
            m: "狙击枪Max"
        }, {
            id: 36,
            slot: "changqiang",
            fire: 4,
            type: 1,
            bullet: 3,
            time: 4,
            total: 50,
            num: 1,
            pow: 30,
            ROT: 50,
            MOV: 2500,
            HP: 4600,
            ATK: 190,
            SPE: 0,
            CRI: 5,
            RAN: 500,
            IDLE: .05,
            m: "加特林Max"
        }, {
            id: 37,
            slot: "changqiang",
            fire: 5,
            type: 4,
            bullet: 0,
            time: 1.5,
            total: 5,
            num: 1,
            pow: 200,
            ROT: 0,
            MOV: 1500,
            HP: 4750,
            ATK: 950,
            SPE: -30,
            CRI: 10,
            RAN: 600,
            IDLE: 2,
            m: "雷鸣Max"
        }, {
            id: 38,
            slot: "changqiang",
            fire: 7,
            type: 7,
            bullet: 0,
            time: 2.5,
            total: 1,
            num: 1,
            pow: 500,
            ROT: 0,
            MOV: 500,
            HP: 4900,
            ATK: 1140,
            SPE: 150,
            CRI: 40,
            RAN: 150,
            IDLE: 2.5,
            m: "火箭枪Max"
        }, {
            id: 39,
            slot: "changqiang",
            fire: 8,
            type: 8,
            bullet: 30,
            time: 3,
            total: 9,
            num: 1,
            pow: 200,
            ROT: 0,
            MOV: 1500,
            HP: 5100,
            ATK: 800,
            SPE: -30,
            CRI: 15,
            RAN: 400,
            IDLE: .9,
            m: "激光枪Max"
        }, {
            id: 40,
            slot: "changqiang",
            fire: 9,
            type: 9,
            bullet: 40,
            time: 2.5,
            total: 20,
            num: 1,
            pow: 30,
            ROT: 0,
            MOV: 1500,
            HP: 5250,
            ATK: 315,
            SPE: 50,
            CRI: 10,
            RAN: 600,
            IDLE: .25,
            m: "冰冻枪Max"
        }, {
            id: 41,
            slot: "changqiang",
            fire: 6,
            type: 5,
            bullet: 0,
            time: 2,
            total: 10,
            num: 1,
            pow: 5,
            ROT: 0,
            MOV: 1500,
            HP: 5400,
            ATK: 300,
            SPE: 50,
            CRI: 5,
            RAN: 450,
            IDLE: .15,
            m: "科技枪Max"
        }, {
            id: 42,
            slot: "changqiang",
            fire: 1,
            type: 1,
            bullet: 2,
            time: 2.5,
            total: 50,
            num: 4,
            pow: 5,
            ROT: 80,
            MOV: 2e3,
            HP: 5550,
            ATK: 120,
            SPE: 20,
            CRI: 8,
            RAN: 650,
            IDLE: .15,
            m: "冲锋枪ZMax"
        }, {
            id: 43,
            slot: "changqiang",
            fire: 2,
            type: 2,
            bullet: 0,
            time: 1,
            total: 5,
            num: 1,
            pow: 200,
            ROT: 0,
            MOV: 2e3,
            HP: 5700,
            ATK: 880,
            SPE: -50,
            CRI: 30,
            RAN: 400,
            IDLE: 1,
            m: "暴力枪ZMax"
        }, {
            id: 44,
            slot: "shouqiang",
            fire: 0,
            type: 6,
            bullet: 2,
            time: 1,
            total: 20,
            num: 1,
            pow: 30,
            ROT: 0,
            MOV: 2e3,
            HP: 5850,
            ATK: 176,
            SPE: 50,
            CRI: 5,
            RAN: 600,
            IDLE: .2,
            m: "反弹枪ZMax"
        }, {
            id: 45,
            slot: "changqiang",
            fire: 4,
            type: 1,
            bullet: 0,
            time: 4,
            total: 50,
            num: 1,
            pow: 40,
            ROT: 50,
            MOV: 2500,
            HP: 6e3,
            ATK: 240,
            SPE: 0,
            CRI: 7,
            RAN: 500,
            IDLE: .05,
            m: "加特林Zero"
        }, {
            id: 46,
            slot: "changqiang",
            fire: 3,
            type: 3,
            bullet: 20,
            time: 3,
            total: 1,
            num: 1,
            pow: 200,
            ROT: 0,
            MOV: 4e3,
            HP: 6250,
            ATK: 2e3,
            SPE: 150,
            CRI: 50,
            RAN: 200,
            IDLE: 3,
            m: "狙击枪Zero"
        }, {
            id: 47,
            slot: "changqiang",
            fire: 5,
            type: 4,
            bullet: 0,
            time: 1.5,
            total: 5,
            num: 1,
            pow: 200,
            ROT: 0,
            MOV: 1500,
            HP: 6500,
            ATK: 1100,
            SPE: -30,
            CRI: 10,
            RAN: 600,
            IDLE: 2,
            m: "雷鸣Zero"
        }, {
            id: 48,
            slot: "changqiang",
            fire: 8,
            type: 8,
            bullet: 32,
            time: 3,
            total: 9,
            num: 1,
            pow: 200,
            ROT: 0,
            MOV: 1500,
            HP: 6750,
            ATK: 1e3,
            SPE: -30,
            CRI: 15,
            RAN: 500,
            IDLE: .9,
            m: "激光枪Zero"
        } ], this.init(), this.levelView.refresh(0), this.personView.init(0, 0), this.petView.initPet(0), 
        c.default.getInstance().addPnl(this.gideView.text, this.gideView), this.initGide();
    }, t.prototype.init = function() {
        for (var o = this, t = Math.floor(this.layout.width / this.tempBox.width), e = 0; e < 12; e++) {
            var i = Math.floor(e / t), n = e % t, l = cc.instantiate(this.tempBox);
            l.parent = this.layout, l.x = n * this.tempBox.width + (this.tempBox.width / 2 - this.layout.width / 2), 
            l.y = -i * this.tempBox.height - this.tempBox.height / 2;
            l = l.getComponent(h.default);
            l.idx = e, this.boxs.push(l);
        }
        this.matrix.forEach(function(t, e) {
            null != t && !isNaN(t) && e < o.boxs.length && o.appendItem(t, o.boxs[e]);
        });
    }, t.prototype.touchStart = function(t) {
        var e = this, o = cc.v2(t.getLocation()), i = this.getBoxs(o);
        0 < i.length && ((t = i[0].item) && !t.isEffect && (this.curItem = t, this.curItem.node.parent = this.node, 
        this.curItem.node.setPosition(this.node.convertToNodeSpaceAR(o)), this.boxs.forEach(function(t) {
            t.item && t != i[0] && !t.item.isEffect && t.item.check(e.curItem) && t.showLight();
        })));
    }, t.prototype.touchMove = function(t) {
        this.curItem && (t = t.getLocation(), this.curItem.node.setPosition(this.node.convertToNodeSpaceAR(t)));
    }, t.prototype.touchEnd = function(t) {
        this.curItem && (t = cc.v2(t.getLocation()), this.boxs.forEach(function(t) {
            return t.hideLight();
        }), 0 < (t = this.getBoxs(t)).length ? this.switchItem(this.curItem, t[0]) : (cc.log("resume"), 
        this.curItem.box.resumeItem()), this.curItem = null);
    }, t.prototype.appendItem = function(t, e) {
        isNaN(t) && (t = 0);
        var o = cc.instantiate(this.tempItem).getComponent(f.default);
        return o ? (2e3 <= t ? (o.rank = t - 2e3, o.type = f.GunType.DRAW) : 1e3 <= t ? (o.rank = t - 1e3, 
        o.type = f.GunType.EGGS) : t < 0 ? (o.rank = -t - 1, o.type = f.GunType.EGGS) : o.rank = t, 
        e.appendItem(o), o.refresh(), o.show(), o) : null;
    }, t.prototype.switchItem = function(t, e) {
        var o = e.item;
        e.isEmpty() ? (cc.log("move"), t.box.item = null, t.box.refresh(), e.appendItem(t)) : o && o != t && !o.isEffect ? t.check(o) ? (m.default.getInstance().checkGide("gide3") || (m.default.getInstance().finishGide("gide3"), 
        c.default.getInstance().getPnl("gide").stopGide()), cc.log("combine"), o.combine(t, function() {
            3 == o.rank && (cc.log("popTest"), c.default.getInstance().loadPopPnl("testCombine", {
                item: o
            }));
        })) : (cc.log("switch"), this.curItem.box.appendItem(o), e.appendItem(this.curItem)) : (cc.log("resume"), 
        t.box.resumeItem());
    }, t.prototype.getBoxs = function(t) {
        var e = cc.v2(this.layout.convertToNodeSpaceAR(t));
        return this.boxs.filter(function(t) {
            return Math.abs(t.node.x - e.x) < t.node.width / 2 && Math.abs(t.node.y - e.y) < t.node.height / 2;
        });
    }, t.prototype.initGide = function() {
        var o, i = this;
        m.default.getInstance().checkGide("gide3") || ((o = c.default.getInstance().getPnl("gide")).showPnl(), 
        new l.default({
            key: "gide3",
            callback: function() {
                r.GD.gides[1] = 2;
                var t = i.boxs[0].node.convertToWorldSpaceAR(cc.Vec2.ZERO), e = o.node.convertToNodeSpaceAR(t);
                o.init([ t ], !1), o.showGide(!1), o.hideCircle(), cc.tween(o.gides[0].node).repeatForever(cc.tween().set({
                    position: e
                }).delay(.5).by(1, {
                    position: cc.v2(150, 0)
                }).delay(.5)).start();
            }
        }).run());
    }, a([ w(cc.Node) ], t.prototype, "tempBox", void 0), a([ w(cc.Node) ], t.prototype, "tempItem", void 0), 
    a([ w(cc.Node) ], t.prototype, "layout", void 0), a([ w(p.default) ], t.prototype, "levelView", void 0), 
    a([ w(g.default) ], t.prototype, "personView", void 0), a([ w(g.default) ], t.prototype, "petView", void 0), 
    a([ w(u.default) ], t.prototype, "gideView", void 0), a([ v ], t);
}(cc.Component);

n.default = b;